///////////////////////////////////////////////////////////////////////
// DiscFormatErase.h
//
// Wrapper for IDiscFormat2Erase Interface
//
// Written by Nic Wilson
//
#pragma once

#define RETURN_CANCEL_WRITE	0
#define RETURN_CONTINUE		1

class CDiscRecorder;

class CDiscFormatErase
{
private:
	IDiscFormat2Erase*	m_discFormatErase;
	SAFEARRAY*			m_mediaTypesArray;
	HRESULT				m_hResult;
	CString				m_errorMessage;
	HWND				m_hNotificationWnd;


public:
	CDiscFormatErase(void);
	~CDiscFormatErase(void);

	inline	HRESULT GetHresult() {return m_hResult;}
	inline	CString GetErrorMessage() {return m_errorMessage;}

	inline	IDiscFormat2Erase* GetInterface() {return m_discFormatErase;}
	bool	Initialize(CDiscRecorder* pDiscRecorder, const CString& clientName);

	bool	Erase(HWND hWnd, BOOL bFull/*, IStream* data*/);

	ULONG	GetTotalSupportedMediaTypes();
	int		GetSupportedMediaType(ULONG index);

	IDiscFormat2Erase* GetIDiscFormat2ErasePtr();
protected:
	IStream*	m_streamData;
};
